package com.code.google.p.jyve;

import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Toolkit;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

public class AboutBox extends JFrame {
	private JPanel contentPane;
	/**
	 * Create the frame.
	 */
	public AboutBox(String versie) {
		setIconImage(Toolkit.getDefaultToolkit().getImage(AboutBox.class.getResource("/com/code/google/p/jyve/Jyve3.png")));
		setTitle("About Jyve Titratiecurven");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 442, 228);
		contentPane = new JPanel();
		contentPane.setBackground(Color.WHITE);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblJyveTitratiecurven = new JLabel("Jyve Titratiecurven");
		lblJyveTitratiecurven.setBounds(151, 11, 194, 14);
		contentPane.add(lblJyveTitratiecurven);
		
		JLabel lblProgrammaVoorHet = new JLabel("Programma voor het tekenen");
		lblProgrammaVoorHet.setBounds(161, 32, 263, 14);
		contentPane.add(lblProgrammaVoorHet);
		
		JLabel lblVanZuurbasetitratiecurven = new JLabel("van zuur-basetitratiecurven");
		lblVanZuurbasetitratiecurven.setBounds(161, 50, 184, 14);
		contentPane.add(lblVanZuurbasetitratiecurven);
		
		JButton btnOk = new JButton("Ok");
		btnOk.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				setVisible(false);
			}
		});
		btnOk.setBounds(335, 158, 89, 23);
		contentPane.add(btnOk);
		
		JLabel lblVersion = new JLabel("Versie " + versie);
		lblVersion.setBounds(151, 75, 194, 14);
		contentPane.add(lblVersion);
		
		JLabel lblNoOfficialCopyright = new JLabel("No official copyright");
		lblNoOfficialCopyright.setBounds(151, 100, 194, 14);
		contentPane.add(lblNoOfficialCopyright);
		
		ImagePanel panel = new ImagePanel();
		panel.setBounds(10, 10, 100, 100);
		panel.setImageFromClasspathResource("/com/code/google/p/jyve/Jyve.png");
		contentPane.add(panel);
	}
}
